package com.zkthink.ceres.order.enums;

import cn.binarywang.wx.miniapp.bean.WxMaGetLiveInfo;
import lombok.Getter;

/** 货物状态
 * @author JustArgo 2020/5/14 23:59
 * @return
 */
@Getter
public enum GoodsStateEnum {

    NO_RECEIVE_GOODS(1,"未收到货"),
    RECEIVE_GOODS(2,"已收到货");

    private int code;
    private String desc;

    GoodsStateEnum(int code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static String findDescByCode(int code){
        GoodsStateEnum[] stateEnumArr = GoodsStateEnum.values();
        for(GoodsStateEnum stateEnum:stateEnumArr){
            if(stateEnum.getCode()==code){
                return stateEnum.getDesc();
            }
        }
        return "状态未知";
    }

}
